<template>
	<div class="header">
		<el-breadcrumb separator="/">
		  <el-breadcrumb-item :to="{ path: '/index' }">项目管理</el-breadcrumb-item>
		  <el-breadcrumb-item :to="{ path: this.$route.path }">{{this.$route.name}}</el-breadcrumb-item>
		</el-breadcrumb>
		<el-button @click='outLogin' type="danger" size="mini">退出登录</el-button>
	</div>
</template>

<script>
	export default{
		name:'Header',
		data(){
			return{
			}
		},
		methods:{
			outLogin(){
				this.$api.outLogin().then(res=>{
						this.$message(res.message)
						this.$router.push('/login');
				})
			}
		}
	}
</script>

<style scoped>
	.header{
		display: flex;
		justify-content: space-between;
		margin-bottom: 30px;
		background-color: #fff;
		padding: 25px;
		border-radius: 3px;
	}
</style>
